package net.huashitong.ssydt.provider.article.service;


import net.huashitong.ssydt.article.entity.SsArticleArticleText;
import net.huashitong.ssydt.provider.article.mapper.SsArticleArticleTextMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.09.14
 */
@Service
@Transactional
public class SsArticleArticleTextServiceImpl implements SsArticleArticleTextService {

    private SsArticleArticleTextMapper mapper;

    @Autowired
    public SsArticleArticleTextServiceImpl(SsArticleArticleTextMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SsArticleArticleText record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(SsArticleArticleText record) {
        return mapper.insertSelective(record);
    }

    @Override
    public SsArticleArticleText selectByPrimaryKey(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

	@Override
	public SsArticleArticleText selectByArticleId(Long articleId) {
		return mapper.selectByArticleId(articleId);
	}

	@Override
    public int updateByPrimaryKeySelective(SsArticleArticleText record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SsArticleArticleText record) {
        return mapper.updateByPrimaryKey(record);
    }

	@Override
	public int updateContentByArticleId(SsArticleArticleText ssArticleArticleText) {
		return mapper.updateContentByArticleId(ssArticleArticleText);
	}

	@Override
	public int deleteByArticleId(Long articleId) {
		return mapper.deleteByArticleId(articleId);
	}
}
